import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const axonEventView = await client.axons.subscribeSse('id');
console.log(axonEventView.axon_id);{
"sequence": 123,
"axon_id": "<string>",
"timestamp_ms": 123,
"origin": "EXTERNAL_EVENT",
"source": "<string>",
"event_type": "<string>",
"payload": "<string>"
}[Beta] Subscribe to an axon event stream via server-sent events.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const axonEventView = await client.axons.subscribeSse('id');
console.log(axonEventView.axon_id);{
"sequence": 123,
"axon_id": "<string>",
"timestamp_ms": 123,
"origin": "EXTERNAL_EVENT",
"source": "<string>",
"event_type": "<string>",
"payload": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The axon identifier.
OK
Monotonic sequence number.
The axon identifier.
Timestamp in milliseconds since epoch.
Event origin.
EXTERNAL_EVENT, AGENT_EVENT, USER_EVENT, SYSTEM_EVENT Event source (e.g. github, slack).
Event type (e.g. push, pull_request).
JSON-encoded event payload.
Was this page helpful?